import { httpInstance } from '@/utils/request'

interface AdminLoginAPIData {
  account: string
  password: string
}

interface AdminLoginAPIResData {
  code: number
  data: {
    userinfo: UserInfo
  }
  msg: string
  time: string
}

export function adminLoginAPI(data: AdminLoginAPIData) {
  return httpInstance.post<
    AdminLoginAPIResData,
    AdminLoginAPIData
  >('api/user/login', data)
}
